1 package controllers
.actions
;
3 import javax
.swing
.undo
.AbstractUndoableEdit
;
5 import controllers
.SelectionController
;
7 import models
.GraphVertex
;
9 public class AddNode
extends AbstractUndoableEdit
{
10 private static final long serialVersionUID
= -7929100929760152271L;
11 private SelectionController selectionController
;
12 private GraphVertex o
;
16 public AddNode(SelectionController selectionController
)
18 this.selectionController
= selectionController
;
19 o
= new GraphVertex();
22 private void redoAction(){
23 selectionController
.getModel().addGraph(o
);
24 selectionController
.setSelected(o
);
36 selectionController
.getModel().removeGraph(o
);
37 selectionController
.removeSelected();
40 public boolean isSignificant(){
44 public String
getPresentationName(){
45 return "Vertex toevoegen.";